#include <stdio.h>
#include <stdlib.h>
#include "config.h"

#ifdef HAVE_POW
  #include "math/MathFunctions.h"
#else
  #include <math.h>
#endif


int main(int argc, char *argv[])
{
    if (argc < 3){
		// print version info
        printf("%s Version %d.%d\n",
            argv[0],
            Demo_VERSION_MAJOR,
            Demo_VERSION_MINOR);
        printf("Usage: %s base exponent \n", argv[0]);
        return 1;
    }
    double base = atof(argv[1]);
    int exponent = atoi(argv[2]);
    
#ifdef HAVE_POW
    double result = power(base, exponent);
#else
    double result = pow(base, exponent);
#endif
    printf("is %g\n", result);
    return 0;
}